package ee.propaganda.gparrot.server;

import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;
import javax.jdo.annotations.IdGeneratorStrategy; 
import javax.jdo.annotations.IdentityType;
import ee.propaganda.gparrot.client.model.ServiceInfo;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class ServiceEntity {
	@PrimaryKey 
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Long id;
	@Persistent
	private String userEmail;
	@Persistent
	private String serviceAccessToken;
	@Persistent
	private ServiceInfo.ServiceType serviceType;
	/**
	 * @return the id
	 */
	Long getId() {
		return id;
	}
	
	/**
	 * @return the userEmail
	 */
	String getUserEmail() {
		return userEmail;
	}
	/**
	 * @param userEmail the userEmail to set
	 */
	void setUserEmail(String userEmail) {
		this.userEmail = userEmail;
	}
	/**
	 * @return the serviceAccessToken
	 */
	String getServiceAccessToken() {
		return serviceAccessToken;
	}
	/**
	 * @param serviceAccessToken the serviceAccessToken to set
	 */
	void setServiceAccessToken(String serviceAccessToken) {
		this.serviceAccessToken = serviceAccessToken;
	}
	
	/**
	 * @return the serviceType
	 */
	ServiceInfo.ServiceType getServiceType() {
		return serviceType;
	}
	/**
	 * @param serviceType the serviceType to set
	 */
	void setServiceType(ServiceInfo.ServiceType serviceType) {
		this.serviceType = serviceType;
	}
	
}
